/* Copyright (c) 2003-2026, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ (function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,e={timestamp:"Q69A",version:"4.5.5 DEV",revision:"2e2d24f",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),e=0;ed.getListenerIndex(e)){d=d.listeners;n||(n=this);isNaN(g)&&(g=10);var k=this;f.fn=e;f.priority=g;for(var D=d.length-1;0<=D;D--)if(d[D].priority<=g)return d.splice(D+1,0,f),{removeListener:h};d.unshift(f)}return{removeListener:h}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this, arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},n=0,m=function(){n=1};return function(g,f,h){var d=e(this)[g];g=a;var k=n;a=n=0;if(d){var D=d.listeners;if(D.length)for(var D=D.slice(0),u,q=0;qdocument.documentMode),mobile:-1c||b.quirks);b.gecko&&(e=a.match(/rv:([\d\.]+)/))&&(e=e[1].split("."),c=1E4*e[0]+100*(e[1]||0)+1*(e[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&7>c)&&!(b.gecko&&4E4>c)&&!(b.webkit&&534>c);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10c;b.cssClass= "cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air");b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load= 1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()}, 1E3*e))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:e})},CKEDITOR.error=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:e})},CKEDITOR.on("log",function(a){if(window.console&& window.console.log){var e=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[e]("[CKEDITOR] Error code: "+b+".",a);else console[e]("[CKEDITOR] Error code: "+b+".");console[e]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+b)}},null,null,999),CKEDITOR.dom={},function(){var a=[],e=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,l=/|\s) /g,function(d,a){return a+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+ this.getNextNumber()},getUniqueId:function(){for(var a="e",d=0;8>d;d++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,d){var k=d(a);k.prototype=a.prototype;return k},setTimeout:function(a,d,k,g,f){f||(f=window);k||(k=f);return f.setTimeout(function(){g?a.apply(k,[].concat(g)):a.apply(k)},d||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a, "")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,"")}}(),indexOf:function(a,d){if("function"==typeof d)for(var k=0,g=a.length;ka;a++)d[a]=("0"+parseInt(d[a],10).toString(16)).slice(-2);return"#"+d.join("")})},parseCssText:function(a,d,g){var f={};g&&(g=new CKEDITOR.dom.element("span"),g.setAttribute("style",a),a=CKEDITOR.tools.convertRgbToHex(g.getAttribute("style")||""));if(!a|| ";"==a)return f;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,g,k){d&&(g=g.toLowerCase(),"font-family"==g&&(k=k.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),k=CKEDITOR.tools.trim(k));f[g]=k});return f},writeCssText:function(a,d){var g,f=[];for(g in a)f.push(g+":"+a[g]);d&&f.sort();return f.join("; ")},objectCompare:function(a,d,g){var f;if(!a&&!d)return!0;if(!a||!d)return!1;for(f in a)if(a[f]!=d[f])return!1;if(!g)for(f in d)if(a[f]!=d[f])return!1; return!0},objectKeys:function(a){var d=[],g;for(g in a)d.push(g);return d},convertArrayToObject:function(a,d){var g={};1==arguments.length&&(d=!0);for(var f=0,b=a.length;fCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(l);return l},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling}, insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var e=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var l=c.parentNode;l&&e.unshift(this.getIndex.call({$:c},a));c=l}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)}, getIndex:function(a){function e(a,b){var g=b?a.nextSibling:a.previousSibling;return g&&g.nodeType==CKEDITOR.NODE_TEXT?g.nodeValue?g:e(g,b):null}var b=this.$,c=-1,l;if(!this.$.parentNode||a&&b.nodeType==CKEDITOR.NODE_TEXT&&!b.nodeValue&&!e(b)&&!e(b,!0))return-1;do if(!a||b==this.$||b.nodeType!=CKEDITOR.NODE_TEXT||!l&&b.nodeValue)c++,l=b.nodeType==CKEDITOR.NODE_TEXT;while(b=b.previousSibling);return c},getNextSourceNode:function(a,e,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&& this.getFirst&&this.getFirst();var l;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(l=(l||this).getParent());){if(b&&!1===b(l,!0))return null;a=l.getNext()}return!a||b&&!1===b(a)?null:e&&e!=a.type?a.getNextSourceNode(!1,e,b):a},getPreviousSourceNode:function(a,e,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var l;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&& (l=(l||this).getParent());){if(b&&!1===b(l,!0))return null;a=l.getPrevious()}return!a||b&&!1===b(a)?null:e&&a.type!=e?a.getPreviousSourceNode(!1,e,b):a},getPrevious:function(a){var e=this.$,b;do b=(e=e.previousSibling)&&10!=e.nodeType&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getNext:function(a){var e=this.$,b;do b=(e=e.nextSibling)&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getParent:function(a){var e=this.$.parentNode;return e&&(e.nodeType==CKEDITOR.NODE_ELEMENT||a&&e.nodeType== CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(e):null},getParents:function(a){var e=this,b=[];do b[a?"push":"unshift"](e);while(e=e.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var e=this.contains?this:this.getParent();do if(e.contains(a))return e;while(e=e.getParent());return null},getPosition:function(a){var e=this.$,b=a.$;if(e.compareDocumentPosition)return e.compareDocumentPosition(b);if(e==b)return CKEDITOR.POSITION_IDENTICAL; if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(e.contains){if(e.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(e))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in e)return 0>e.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:e.sourceIndex=document.documentMode||!e||(a=e+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)}, getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a= this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a, e){"string"==typeof a&&(a=(e?e.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,e){var b=new CKEDITOR.dom.element("div",e);b.setHtml(a);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,e,b,c){var l= e.getCustomData("list_marker_id")||e.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),n=e.getCustomData("list_marker_names")||e.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[l]=e;n[b]=1;return e.setCustomData(b,c)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var e in a)CKEDITOR.dom.element.clearMarkers(a,a[e],1)},CKEDITOR.dom.element.clearMarkers=function(a,e,b){var c=e.getCustomData("list_marker_names"),l=e.getCustomData("list_marker_id"), n;for(n in c)e.removeCustomData(n);e.removeCustomData("list_marker_names");b&&(e.removeCustomData("list_marker_id"),delete a[l])},function(){function a(a,f){return-1<(" "+a+" ").replace(n," ").indexOf(" "+f+" ")}function e(a){var f=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),f=!1);return function(){f||a.removeAttribute("id")}}function b(a,f){return"#"+a.$.id+" "+f.split(/,\s*/).join(", #"+a.$.id+" ")}function c(a){for(var f=0,b=0,d=m[a].length;bCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a, f){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);var d=b.extractContents(!1,f||!1);b.insertNode(this.remove());d.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var f=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?f.contains(a.getParent().$):f!=a.$&&f.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(g){}}return function(f){f?CKEDITOR.tools.setTimeout(a, 100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&& 9>CKEDITOR.env.version?function(a){try{var f=this.$;if(this.getParent())return f.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(f);f.innerHTML=a;b.removeChild(f);return a}catch(d){this.$.innerHTML="";f=new CKEDITOR.dom.element("body",this.getDocument());f.$.innerHTML=a;for(f=f.getChildren();f.count();)this.append(f.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(f){this.$[a? "textContent":"innerText"]=f}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null; case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var f=this.getWindow().$.getComputedStyle(this.$,null);return f? f.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()}, getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var f=this.$.scopeName;"HTML"!=f&&(a=f.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var f=this.$.firstChild;(f=f&&new CKEDITOR.dom.node(f))&&a&&!a(f)&&(f=f.getNext(a));return f},getLast:function(a){var f=this.$.lastChild; (f=f&&new CKEDITOR.dom.node(f))&&a&&!a(f)&&(f=f.getPrevious(a));return f},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var f=0;fCKEDITOR.env.version&&this.is("a")){var b=this.getParent();b.type==CKEDITOR.NODE_ELEMENT&&(b=b.clone(),b.setHtml(f),f=b.getHtml(),b.setHtml(a),a=b.getHtml())}return f==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),f,b;a&&CKEDITOR.env.webkit&&(f=this.getWindow(),!f.equals(CKEDITOR.document.getWindow())&& (b=f.$.frameElement)&&(a=(new CKEDITOR.dom.element(b)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),f=0,b=a.count();fCKEDITOR.env.version?function(f){return"name"==f?!!this.$.name:a.call(this,f)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,f){var b=this.$;a=a.$;if(b!=a){var d;if(f)for(;d=b.lastChild;)a.insertBefore(b.removeChild(d), a.firstChild);else for(;d=b.firstChild;)a.appendChild(b.removeChild(d))}},mergeSiblings:function(){function a(f,b,d){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var k=[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(k.push(b),b=d?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(f.isIdentical(b)){for(var g=d?f.getLast():f.getFirst();k.length;)k.shift().move(f,!d);b.moveChildren(f,!d);b.remove();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(b){if(!1=== b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,h){"class"==b?this.$.className=h:"style"==b?this.$.style.cssText=h:"tabindex"==b?this.$.tabIndex=h:"checked"==b?this.$.checked=h:"contenteditable"==b?a.call(this, "contentEditable",h):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,h){if("src"==b&&h.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)? function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),h=0,d=b.count();he||0 e?e:k);h&&(0>c||0c?c:d,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+ "_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var d=0;d=x.getChildCount()?(x=x.getChild(C-1),I=!0):x=x.getChild(C):J=I=!0;p.type==CKEDITOR.NODE_TEXT? r?H=!0:p.split(v):0ia)for(;Y;)Y=e(Y,P,!0);P=ca}r||l()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),f=CKEDITOR.dom.walker.bogus();return function(h){return c(h)||b(h)?!0:f(h)&&!a?a=!0:h.type==CKEDITOR.NODE_TEXT&&(h.hasAscendant("pre")||CKEDITOR.tools.trim(h.getText()).length)||h.type==CKEDITOR.NODE_ELEMENT&&!h.is(n)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(), c=CKEDITOR.dom.walker.bookmark(1);return function(h){return c(h)||b(h)?!0:!a&&m(h)||h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.$removeEmpty)}}function l(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&h(a)&&(b=a);return f(a)&&!(m(a)&&a.equals(b))})}}var n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},m=CKEDITOR.dom.walker.bogus(), g=/^[\t\r\n ]*(?: |\xa0)$/,f=CKEDITOR.dom.walker.editable(),h=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer), this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||e(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,h,f,e=this.collapsed;b=this.document.createElement("span"); b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(h="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",h+(e?"C":"S")));e||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",h+"E"),f=this.clone(),f.collapse(),f.insertNode(c));f=this.clone();f.collapse(!0);f.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?h+(e?"C":"S"):b,endNode:a?h+"E":c,serializable:a,collapsed:e}},createBookmark2:function(){function a(d){var c= d.container,h=d.offset,f;f=c;var e=h;f=f.type!=CKEDITOR.NODE_ELEMENT||0===e||e==f.getChildCount()?0:f.getChild(e-1).type==CKEDITOR.NODE_TEXT&&f.getChild(e).type==CKEDITOR.NODE_TEXT;f&&(c=c.getChild(h-1),h=c.getLength());c.type==CKEDITOR.NODE_ELEMENT&&1c)a=a.getChild(c);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>h)b=b.getChild(h).getPreviousSourceNode(!0);else if(1>f)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c= this.startContainer,h=this.endContainer,c=c.equals(h)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(h);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))}, optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,h=this.startOffset,f=this.collapsed;if((!a||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(h)if(h>=c.getLength())h=c.getIndex()+1,c=c.getParent();else{var e=c.split(h),h=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)? this.setEnd(e,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else h=c.getIndex(),c=c.getParent();this.setStart(c,h);if(f){this.collapse(!0);return}}c=this.endContainer;h=this.endOffset;b||f||!c||c.type!=CKEDITOR.NODE_TEXT||(h?(h>=c.getLength()||c.split(h),h=c.getIndex()+1):h=c.getIndex(),c=c.getParent(),this.setEnd(c,h))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var h=new RegExp(/[^\s\ufeff]/); switch(a){case CKEDITOR.ENLARGE_INLINE:var f=1;case CKEDITOR.ENLARGE_ELEMENT:var e=function(a,d){var b=new CKEDITOR.dom.range(l);b.setStart(a,d);b.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);var b=new CKEDITOR.dom.walker(b),c;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};c=b.next();){if(c.type!=CKEDITOR.NODE_TEXT)return!1;n=c!=a?c.getText():c.substring(d);if(h.test(n))return!1}return!0};if(this.collapsed)break;var g=this.getCommonAncestor(),l=this.root,m,w,r,p, x,v=!1,C,n;C=this.startContainer;var I=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(I&&(C=!CKEDITOR.tools.trim(C.substring(0,I)).length&&C,v=!!C),C&&((p=C.getPrevious())||(r=C.getParent()))):(I&&(p=C.getChild(I-1)||C.getLast()),p||(r=C));for(r=c(r);r||p;){if(r&&!p){!x&&r.equals(g)&&(x=!0);if(f?r.isBlockBoundary():!l.contains(r))break;v&&"inline"==r.getComputedStyle("display")||(v=!1,x?m=r:this.setStartBefore(r));p=r.getPrevious()}for(;p;)if(C=!1,p.type==CKEDITOR.NODE_COMMENT)p=p.getPrevious();else{if(p.type== CKEDITOR.NODE_TEXT)n=p.getText(),h.test(n)&&(p=null),C=/[\s\ufeff]$/.test(n);else if((p.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&p.is("br"))&&!p.data("cke-bookmark"))if(v&&CKEDITOR.dtd.$removeEmpty[p.getName()]){n=p.getText();if(h.test(n))p=null;else for(var I=p.$.getElementsByTagName("*"),E=0,J;J=I[E++];)if(!CKEDITOR.dtd.$removeEmpty[J.nodeName.toLowerCase()]){p=null;break}p&&(C=!!n.length)}else p=null;C&&(v?x?m=r:r&&this.setStartBefore(r):v=!0);if(p){C=p.getPrevious();if(!r&&!C){r=p;p=null;break}p= C}else r=null}r&&(r=c(r.getParent()))}C=this.endContainer;I=this.endOffset;r=p=null;x=v=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(I)).length?v=!0:(v=!C.getLength(),I==C.getLength()?(p=C.getNext())||(r=C.getParent()):e(C,I)&&(r=C.getParent())):(p=C.getChild(I))||(r=C);for(;r||p;){if(r&&!p){!x&&r.equals(g)&&(x=!0);if(f?r.isBlockBoundary():!l.contains(r))break;v&&"inline"==r.getComputedStyle("display")||(v=!1,x?w=r:r&&this.setEndAfter(r));p=r.getNext()}for(;p;){C=!1;if(p.type==CKEDITOR.NODE_TEXT)n= p.getText(),e(p,0)||(p=null),C=/^[\s\ufeff]/.test(n);else if(p.type==CKEDITOR.NODE_ELEMENT){if((0=f.getLength()?h.setStartAfter(f):(h.setStartBefore(f),m=0):h.setStartBefore(f));e&&e.type==CKEDITOR.NODE_TEXT&&(l?l>=e.getLength()?h.setEndAfter(e):(h.setEndAfter(e),w=0):h.setEndBefore(e));var h=new CKEDITOR.dom.walker(h),r=CKEDITOR.dom.walker.bookmark();h.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)}; var p;h.guard=function(b,k){if(r(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||k&&b.equals(p)||!1===c&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;k||b.type!=CKEDITOR.NODE_ELEMENT||(p=b);return!0};m&&(f=h[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(f,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);w&&(h.reset(),(h=h[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward": "previous"]())&&this.setEndAt(h,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!m&&!w)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer, a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b); this.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type== CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break; case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=this.createBookmark(),h=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(h);h.trim();this.insertNode(h);var f=h.getBogus();f&&f.remove();h.appendBogus();this.moveToBookmark(c);return h},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),h=new CKEDITOR.dom.elementPath(this.endContainer,this.root), f=c.block,e=h.block,g=null;if(!c.blockLimit.equals(h.blockLimit))return null;"br"!=a&&(f||(f=this.fixBlock(!0,a),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,a)));c=f&&this.checkStartOfBlock();h=e&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(e)&&(h?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),e=null):c?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f, CKEDITOR.POSITION_BEFORE_START),f=null):(e=this.splitElement(f,b||!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:e,wasStartOfBlock:c,wasEndOfBlock:h,elementPath:g}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),h=a.clone(!1,b||!1);c.appendTo(h);h.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return h},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)|| c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||d.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),k=this[b?"endPath":"startPath"](),h=k.block||k.blockLimit,f;h&&!h.equals(k.root)&&!h.getFirst(a(h));)f=h.getParent(),this[b?"setEndAt":"setStartAt"](h,CKEDITOR.POSITION_AFTER_END),h.remove(1),h=f;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer, this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,b){var h=b==CKEDITOR.START,f=this.clone();f.collapse(h);f[h?"setStartAt":"setEndAt"](a,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=c(h);return f[h?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var c=this.startContainer,h=this.startOffset;CKEDITOR.env.ie&&h&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.ltrim(c.substring(0, h)),g.test(c)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(a){var c=this.endContainer,h=this.endOffset;CKEDITOR.env.ie&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.rtrim(c.substring(h)),g.test(c)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer, this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var h=this.clone();h.collapse(1);h.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(h);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var h=this.clone();h.collapse();h.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(h); c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,d){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(d)||b.equals(d)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a, b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&g.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&& this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var f=a,e=c,l=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(!1)&&(l=f[b?"getLast":"getFirst"](h));e||l||(l=f[b?"getPrevious":"getNext"](h));a=l}return!!c},moveToClosestEditablePosition:function(a,b){var c,h=0,f,e,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root), c.moveToPosition(a,g[b?0:1])):c=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))h=1;else if(f=c[b?"getNextEditableNode":"getPreviousEditableNode"]())h=1,(e=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?(c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(f,0),c.collapse()):c.moveToPosition(f,g[b?1:0]);h&&this.moveToRange(c); return!!h},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var h=a.next(); a.reset();return h&&h.equals(a.previous())?h:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:l(),getPreviousEditableNode:l(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document), b,c,h,f=this.clone();f.optimize();(h=f.startContainer.type==CKEDITOR.NODE_TEXT)?(c=f.startContainer.getText(),b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView();h&&(f.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END= 4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function e(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b} function b(a,d,c,f){a:{null==f&&(f=e(c));for(var g;g=f.shift();)if(g.getDtd().p){f={element:g,remaining:f};break a}f=null}if(!f)return 0;if((g=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!g.check(d))return b(a,d,c,f.remaining);d=new CKEDITOR.dom.range(f.element);d.selectNodeContents(f.element);d=d.createIterator();d.enlargeBr=a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=g;a._.nestedEditable={element:f.element,container:c,remaining:f.remaining,iterator:d}; return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var l=/^[\r\n\t ]+$/,n=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0),g=function(a){return n(a)&&m(a)},f={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,k,e,m,q;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d; this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var z=this.range.clone();k=z.startPath();var y=z.endPath(),A=!z.collapsed&&c(z,k.block),B=!z.collapsed&&c(z,y.block,1);z.shrink(CKEDITOR.SHRINK_ELEMENT,!0);A&&z.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END); B&&z.setEndAt(y.block,CKEDITOR.POSITION_AFTER_START);k=z.endContainer.hasAscendant("pre",!0)||z.startContainer.hasAscendant("pre",!0);z.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);z.collapsed||(k=new CKEDITOR.dom.walker(z.clone()),y=CKEDITOR.dom.walker.bookmark(!0,!0),k.evaluator=y,this._.nextNode=k.next(),k=new CKEDITOR.dom.walker(z.clone()),k.evaluator=y,k=k.previous(),this._.lastNode=k.getNextSourceNode(!0,null,z.root),this._.lastNode&& this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(y=this.range.clone(),y.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),y.checkEndOfBlock()&&(y=new CKEDITOR.dom.elementPath(y.endContainer,y.root),this._.lastNode=(y.block||y.blockLimit).getNextSourceNode(!0))),this._.lastNode&&z.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=z.document.createText(""),this._.lastNode.insertAfter(k)), z=null);this._.started=1;k=z}y=this._.nextNode;z=this._.lastNode;for(this._.nextNode=null;y;){var A=0,B=y.hasAscendant("pre"),w=y.type!=CKEDITOR.NODE_ELEMENT,r=0;if(w)y.type==CKEDITOR.NODE_TEXT&&l.test(y.getText())&&(w=0);else{var p=y.getName();if(CKEDITOR.dtd.$block[p]&&"false"==y.getAttribute("contenteditable")){d=y;b(this,a,d);break}else if(y.isBlockBoundary(this.forceBrBreak&&!B&&{br:1})){if("br"==p)w=1;else if(!k&&!y.getChildCount()&&"hr"!=p){d=y;e=y.equals(z);break}k&&(k.setEndAt(y,CKEDITOR.POSITION_BEFORE_START), "br"!=p&&(this._.nextNode=y));A=1}else{if(y.getFirst()){k||(k=this.range.clone(),k.setStartAt(y,CKEDITOR.POSITION_BEFORE_START));y=y.getFirst();continue}w=1}}w&&!k&&(k=this.range.clone(),k.setStartAt(y,CKEDITOR.POSITION_BEFORE_START));e=(!A||w)&&y.equals(z);if(k&&!A)for(;!y.getNext(g)&&!e;){p=y.getParent();if(p.isBlockBoundary(this.forceBrBreak&&!B&&{br:1})){A=1;w=0;e||p.equals(z);k.setEndAt(p,CKEDITOR.POSITION_BEFORE_END);break}y=p;w=1;e=y.equals(z);r=1}w&&k.setEndAt(y,CKEDITOR.POSITION_AFTER_END); y=this._getNextSourceNode(y,r,z);if((e=!y)||A&&k)break}if(!d){if(!k)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(k.startContainer,k.root);y=d.blockLimit;A={div:1,th:1,td:1};d=d.block;!d&&y&&!this.enforceRealBlocks&&A[y.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock()&&!y.equals(k.root)?d=y:!d||this.enforceRealBlocks&&d.is(f)?(d=this.range.document.createElement(a),k.extractContents().appendTo(d),d.trim(),k.insertNode(d),m=q=!0): "li"!=d.getName()?k.checkStartOfBlock()&&k.checkEndOfBlock()||(d=d.clone(!1),k.extractContents().appendTo(d),d.trim(),q=k.splitBlock(),m=!q.wasStartOfBlock,q=!q.wasEndOfBlock,k.insertNode(d)):e||(this._.nextNode=d.equals(z)?null:this._getNextSourceNode(k.getBoundaryNodes().endNode,1,z))}m&&(m=d.getPrevious())&&m.type==CKEDITOR.NODE_ELEMENT&&("br"==m.getName()?m.remove():m.getLast()&&"br"==m.getLast().$.nodeName.toLowerCase()&&m.getLast().remove());q&&(m=d.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&& "br"==m.getName()&&(!CKEDITOR.env.needsBrFiller||m.getPrevious(n)||m.getNext(n))&&m.remove();this._.nextNode||(this._.nextNode=e||d.equals(z)||!z?null:this._getNextSourceNode(d,1,z));return d},_getNextSourceNode:function(a,b,c){function f(a){return!(a.equals(c)||a.equals(e))}var e=this.range.root;for(a=a.getNextSourceNode(b,null,f);!n(a);)a=a.getNextSourceNode(b,null,f);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,e){this.uiItems= [];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==e.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:b})?!0:e.refresh&&!1!==e.refresh.apply(this, arguments)};var b;this.checkAllowed=function(c){return c||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,e,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!e.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)}, setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0, language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,d,c,f){var h,k;a=[];for(h in b){k=b[h];k="boolean"==typeof k? {}:"function"==typeof k?{match:k}:E(k);"$"!=h.charAt(0)&&(k.elements=h);d&&(k.featureName=d.toLowerCase());var e=k;e.elements=m(e.elements,/\s+/)||null;e.propertiesOnly=e.propertiesOnly||!0===e.elements;var g=/\s*,\s*/,p=void 0;for(p in O){e[p]=m(e[p],g)||null;var l=e,x=t[p],z=m(e[t[p]],g),w=e[p],v=[],C=!0,G=void 0;z?C=!1:z={};for(G in w)"!"==G.charAt(0)&&(G=G.slice(1),v.push(G),z[G]=!0,C=!1);for(;G=v.pop();)w[G]=w["!"+G],delete w["!"+G];l[x]=(C?!1:z)||null}e.match=e.match||null;c.push(k);a.push(k)}b= f.elements;f=f.generic;var F;d=0;for(c=a.length;d=--g&&(n&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),d(b))},D=function(b,d){a[b]=1;var c=e[b]; delete e[b];for(var f=0;fCKEDITOR.env.version?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,D(b,!0)}:(f.$.onload=function(){setTimeout(function(){D(b,!0)},0)},f.$.onerror=function(){D(b,!1)}));f.appendTo(CKEDITOR.document.getHead())}}}; n&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var q=0;q]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}, function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,e={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(b){for(var c,l,n=0,m;c=this._.htmlPartsRegex.exec(b);){l=c.index;if(l>n)if(n=b.substring(n,l),m)m.push(n);else this.onText(n); n=this._.htmlPartsRegex.lastIndex;if(l=c[1])if(l=l.toLowerCase(),m&&CKEDITOR.dtd.$cdata[l]&&(this.onCDATA(m.join("")),m=null),!m){this.onTagClose(l);continue}if(m)m.push(c[0]);else if(l=c[3]){if(l=l.toLowerCase(),!/="/.test(l)){var g={},f,h=c[4];c=!!c[5];if(h)for(;f=a.exec(h);){var d=f[1].toLowerCase();f=f[2]||f[3]||f[4]||"";g[d]=!f&&e[d]?d:CKEDITOR.tools.htmlDecodeAttr(f)}this.onTagOpen(l,g,c);!m&&CKEDITOR.dtd.$cdata[l]&&(m=[])}}else if(l=c[2])this.onComment(l)}if(b.length>n)this.onText(b.substring(n, b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,e){e?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,e){"string"==typeof e&&(e=CKEDITOR.tools.htmlEncodeAttr(e));this._.output.push(" ",a,'\x3d"',e,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--", a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var e=this._.output.join("");a&&this.reset();return e}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,e=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(e,1);this.parent=null},replaceWith:function(a){var e=this.parent.children, b=CKEDITOR.tools.indexOf(e,this),c=a.previous=this.previous,l=a.next=this.next;c&&(c.next=a);l&&(l.previous=a);e[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var e=a.parent.children,b=CKEDITOR.tools.indexOf(e,a),c=a.next;e.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var e=a.parent.children,b=CKEDITOR.tools.indexOf(e,a);e.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next= this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var e="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(e(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment= function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,e){var b=this.value;if(!(b=a.onComment(e,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,e){e&&this.filter(e);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,e){if(!(this.value=a.onText(e,this.value,this)))return this.remove(),!1},writeHtml:function(a,e){e&&this.filter(e);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict", CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var e=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),l={ul:"li", ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(n,m,g){function f(a){var b;if(0m;m++)if(n=e[m]){n= n.exec(a,c,this);if(!1===n)return null;if(n&&n!=c)return this.onNode(a,n);if(c.parent&&!c.name)break}return c},onNode:function(a,c){var e=c.type;return e==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):e==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):e==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,e,n){return(e=this.attributesRules[e])?e.exec(a,n,c,this):n}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype= {add:function(a,c,e){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:e})},addMany:function(a,c,e){for(var n=[this.findIndex(c),0],m=0,g=a.length;m/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function k(a){return a.replace(O,function(a,b){return decodeURIComponent(b)})}function D(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function(a){return"\x3c!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function u(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function q(a,b){var d=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function z(a,b){var d=[],c=b.config.protectedSource,f=b._.dataStore||(b._.dataStore= {id:1}),h=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,c=[/|$)/gi,//gi,//gi].concat(c);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var k=0;k]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,f){return"\x3c"+d+c+"\x3e"+q(u(f),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c, f,g=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(p);c.addRules(x,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});f.addRules(v);f.addRules(C,{applyToAll:!0});f.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,f,c=z(c,b),c=d(c,H),c=h(c),c=d(c,J),c=c.replace(t,"$1cke:$2"),c=c.replace(L,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");f=a.context||b.editable().getName();var g;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",g=1);f=b.document.createElement(f);f.setHtml("a"+c);c=f.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");g&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(F,"$1$2");c=k(c);c=u(c);f=!1===a.fixForBody?!1:
e(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,f);f&&(g=c,!g.children.length&&CKEDITOR.dtd[g.name][f]&&(f=new CKEDITOR.htmlParser.element(f),g.add(f)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(!0);a.dataValue=D(b)},null,null,15);b.on("toDataFormat",function(a){var d=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,e(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, !1,!0)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,c=g.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(!0);d=u(d);d=q(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var f=this.editor,h,k,e,t;b&&"object"==typeof b?(h=b.context,d=b.fixForBody,c=b.dontFilter,k=b.filter,e=b.enterMode,t=b.protectedWhitespaces):h=b;h||null===h||(h=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:h,fixForBody:d,dontFilter:c, filter:k||f.filter,enterMode:e||f.enterMode,protectedWhitespaces:t}).dataValue},toDataFormat:function(a,b){var d,c,f;b&&(d=b.context,c=b.filter,f=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:c||this.editor.filter,context:d,enterMode:f||this.editor.enterMode}).dataValue}};var y=/(?: |\xa0)$/,A="{cke_protected}",B=CKEDITOR.dtd,w="caption colgroup col thead tfoot tbody".split(" "),r=CKEDITOR.tools.extend({},B.$blockLimit, B.$block),p={elements:{input:g,textarea:g}},x={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},v={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},C={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/, ""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],c,f=0;fc? 1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&m(a,b=new CKEDITOR.htmlParser.text); b.value=a.attributes["data-cke-title"]||""},input:f,textarea:f},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var K=/<(a|area|img|input|source)\b([^>]*)>/gi,I=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/^(href|src|name)$/i,J=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, H=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,O=/([^<]*)<\/cke:encoded>/gi,t=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,F=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(a,e){this.name=a;this.attributes=e||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]|| CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}},CKEDITOR.htmlParser.cssStyle=function(a){var e={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,l){"font-family"==c&&(l=l.replace(/["']/g,""));e[c.toLowerCase()]=l});return{rules:e,populate:function(a){var c= this.toString();c&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c)},toString:function(){var a=[],c;for(c in e)e[c]&&a.push(c,":",e[c],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var e=function(a,b){a=a[0];b=b[0];return ab?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var e=this,m,g;b=e.getFilterContext(b);if(b.off)return!0;if(!e.parent)a.onRoot(b,e);for(;;){m=e.name;if(!(g=a.onElementName(b,m)))return this.remove(),!1;e.name=g;if(!(e=a.onElement(b,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==m)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e), !1;if(!e.name)return this.replaceWithChildren(),!1}m=e.attributes;var f,h;for(f in m){for(g=m[f];;)if(h=a.onAttributeName(b,f))if(h!=f)delete m[f],f=h;else break;else{delete m[f];break}h&&(!1===(g=a.onAttribute(b,e,h,g))?delete m[h]:m[h]=g)}e.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var n=this.name,m=[],g=this.attributes,f,h;a.openTag(n,g);for(f in g)m.push([f,g[f]]);a.sortAttributes&&m.sort(e);f=0;for(h=m.length;fCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus", function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};A.eol.detect(a,this);A.bogus.exclude(a);A.cell.shrink(a);a.fragment=a.range.cloneContents();A.tree.rebuild(a,this);A.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=B,c={range:a,doc:a.document},f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE, 1);d.table.detectPurge(c);c.bookmark=a.createBookmark();delete c.range;var e=this.editor.createRange();e.moveToPosition(c.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);c.targetBookmark=e.createBookmark();d.list.detectMerge(c,this);d.table.detectRanges(c,this);d.block.detectMerge(c,this);c.tableContentsRanges?(d.table.deleteRanges(c),a.moveToBookmark(c.bookmark),c.range=a):(a.moveToBookmark(c.bookmark),c.range=a,a.extractContents(d.detectExtractMerge(c)));a.moveToBookmark(c.targetBookmark);a.optimize(); d.fixUneditableRangePosition(a);d.list.merge(c,this);d.table.purge(c,this);d.block.merge(c,this);if(b){d=a.startPath();if(c=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var c=d.block.getElementsByTag("span"),e=0,h;if(c)for(;h=c.getItem(e++);)if(!k(h)){c=!0;break a}c=!1}c=!c}c&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),D(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings(); return f},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(q,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a, "beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"): a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom", function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var f=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var e=a.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var k=CKEDITOR.getCss();k&&(e=f.getHead(),e.getCustomData("stylesheet")||(k=f.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement), e.setCustomData("stylesheet",k),k.data("cke-temp",1)));e=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref",e+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var g={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),f;if(c in g){b=a.getSelection();var e,h=b.getRanges()[0],k=h.startPath(),p,t,F,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=n(b))?(a.fire("saveSnapshot"),h.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),h.select(),a.fire("saveSnapshot"),f=1):h.collapsed&&((p=k.block)&&(F=p[c?"getPrevious":"getNext"](d))&&F.type==CKEDITOR.NODE_ELEMENT&&F.is("table")&&h[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),h[c?"checkEndOfBlock":"checkStartOfBlock"]()&& p.remove(),h["moveToElementEdit"+(c?"End":"Start")](F),h.select(),a.fire("saveSnapshot"),f=1):k.blockLimit&&k.blockLimit.is("td")&&(t=k.blockLimit.getAscendant("table"))&&h.checkBoundaryOfElement(t,c?CKEDITOR.START:CKEDITOR.END)&&(F=t[c?"getPrevious":"getNext"](d))?(a.fire("saveSnapshot"),h["moveToElementEdit"+(c?"End":"Start")](F),h.checkStartOfBlock()&&h.checkEndOfBlock()?F.remove():h.select(),a.fire("saveSnapshot"),f=1):(t=k.contains(["td","th","caption"]))&&h.checkBoundaryOfElement(t,c?CKEDITOR.START: CKEDITOR.END)&&(f=1))}return!f});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in g&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge|| this.attachListener(this,"mousedown",function(b){var d=b.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(a.getSelection().selectElement(d),d.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(q, ""))){var d=a.createRange();d.moveToElementEditStart(b);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in g){var d=8==b,c=a.getSelection().getRanges()[0];b=c.startPath(); if(c.collapsed)a:{var f=b.block;if(f&&c[d?"checkStartOfBlock":"checkEndOfBlock"](!0)&&c.moveToClosestEditablePosition(f,!d)&&c.collapsed){if(c.startContainer.type==CKEDITOR.NODE_ELEMENT){var e=c.startContainer.getChild(c.startOffset-(d?1:0));if(e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("hr")){a.fire("saveSnapshot");e.remove();b=!0;break a}}c=c.startPath().block;if(!c||c&&c.contains(f))b=void 0;else{a.fire("saveSnapshot");var k;(k=(d?c:f).getBogus())&&k.remove();k=a.getSelection();e=k.createBookmarks(); (d?f:c).moveChildren(d?c:f,!1);b.lastElement.mergeSiblings();h(f,c,!d);k.selectBookmarks(e);b=!0}}else b=!1}else d=c,k=b.block,c=d.endPath().block,k&&c&&!k.equals(c)?(a.fire("saveSnapshot"),(f=k.getBogus())&&f.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),c.getParent()&&(c.moveChildren(k,!1),b.lastElement.mergeSiblings(),h(k,c,!0)),d=a.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),b=!0):b=!1;if(!b)return; a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload"); delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var d=b.editor;d.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")? "true":"1"),a.setAttribute("contentEditable",!1))});d.on("selectionChange",function(b){if(!d.readOnly){var c=d.getSelection();c&&!c.isLocked&&(c=d.checkDirty(),d.fire("lockSnapshot"),a(b),d.fire("unlockSnapshot"),!c&&d.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var d=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var c=b.fire("ariaEditorHelpLabel",{}).label; if(c&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var f=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+c+"\x3c/span\x3e");d.append(c);a.changeAttr("aria-describedby",f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var d=CKEDITOR.dom.walker.whitespaces(!0),k=CKEDITOR.dom.walker.bookmark(!1,!0),D=CKEDITOR.dom.walker.empty(), u=CKEDITOR.dom.walker.bogus(),q=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,z=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var f,e,h,k,g=[],p=c.range.startContainer;f=c.range.startPath();for(var p=l[p.getName()],m=0,v=d.getChildren(),x=v.count(),q=-1,C=-1,u=0,n=f.contains(l.$list);mCKEDITOR.env.version&&c.getChildCount()&&c.getFirst().remove())}return function(c){var f=c.startContainer,e=f.getAscendant("table",1),h=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=c.clone();e.setStart(f,0);e=a(e).lastBackward();e||(e=c.clone(),e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),h=!0);e||(e=f);e.is("table")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START), c.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",h)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",h)),(f=e.getBogus())&&f.remove(),c.moveToPosition(e,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}(),A={eol:{detect:function(a,b){var d=a.range,c=d.clone(),f=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,b),h=new CKEDITOR.dom.elementPath(d.endContainer,b);c.collapse(1);f.collapse();e.block&&c.checkBoundaryOfElement(e.block,CKEDITOR.END)&& (d.setStartAfter(e.block),a.prependEolBr=1);h.block&&f.checkBoundaryOfElement(h.block,CKEDITOR.START)&&(d.setEndBefore(h.block),a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),c;a.appendEolBr&&(c=this.createEolBr(d),a.fragment.append(c));!a.prependEolBr||c&&!c.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode; !b||!u(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),f=new CKEDITOR.dom.elementPath(c,b),e=new CKEDITOR.dom.elementPath(d.startContainer,b),d=new CKEDITOR.dom.elementPath(d.endContainer,b),h;c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());if(f.blockLimit.is({tr:1,table:1})){var k=f.contains("table").getParent();h=function(a){return!a.equals(k)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list), !e.equals(d))){var g=f.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(g)}}h||(h=function(a){return!a.equals(f.block)&&!a.equals(f.blockLimit)});this.rebuildFragment(a,b,c,h)},rebuildFragment:function(a,b,d,c){for(var f;d&&!d.equals(b)&&c(d);)f=d.clone(0,1),a.fragment.appendTo(f),a.fragment=f,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer,c=a.startOffset,f=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c== f&&a.shrink(CKEDITOR.SHRINK_TEXT)}}},B=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,f){a(c);a(f,1);for(var e;e=f.getNext();)e.insertAfter(c),c=e;D(d)&&d.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b,a.bookmark),f=c.startPath(),e=c.endPath(),h=f.contains(CKEDITOR.dtd.$list),k=e.contains(CKEDITOR.dtd.$list); a.mergeList=h&&k&&h.getParent().equals(k.getParent())&&!h.equals(k);a.mergeListItems=f.block&&e.block&&f.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)c=c.clone(),c.setStartBefore(a.bookmark.startNode),c.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=c.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var c=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(f, d);if(a.mergeList){var k=e.contains(CKEDITOR.dtd.$list),g=h.contains(CKEDITOR.dtd.$list);k.equals(g)||(g.moveChildren(k),g.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$listItem),e.equals(h)||b(h,c,f));c.remove();f.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}}, merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var c=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(f,d),e=e.block,h=h.block;e&&h&&!e.equals(h)&&b(h,c,f);c.remove();f.remove()}}},table:function(){function a(d){var f=[],e,h=new CKEDITOR.dom.walker(d),k=d.startPath().contains(c),g=d.endPath().contains(c),t={};h.guard=function(a,h){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(h?"out":"in");if(a.getCustomData(l))return; CKEDITOR.dom.element.setMarker(t,a,l,1)}if(h&&k&&a.equals(k))e=d.clone(),e.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),f.push(e);else if(!h&&g&&a.equals(g))e=d.clone(),e.setStartAt(g,CKEDITOR.POSITION_AFTER_START),f.push(e);else{if(l=!h)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!k||b(a,k))&&(!g||b(a,g));l&&(e=d.clone(),e.selectNodeContents(a),f.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(t);return f}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED, f=a.getPosition(d);return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&c)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),f=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++f};d.checkForward();if(1d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getAttribute("contenteditable")}}}function D(a){for(var b=0;b=c.getLength()?k.setStartAfter(c):k.setStartBefore(c));f&&f.type==CKEDITOR.NODE_TEXT&&(h?k.setEndAfter(f):k.setEndBefore(f));c=new CKEDITOR.dom.walker(k); c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var f=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);c.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(c),f.collapsed||a.splice(b+1,0,f));return!0}return!1};c.next()}}return a}var u,q,z=CKEDITOR.dom.walker.invisible(1),y=!0,A=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]);return!1}} function b(a){return function(b){var d=b.editor,c=d.createRange(),f;(f=c.moveToClosestEditablePosition(b.selected,a))||(f=c.moveToClosestEditablePosition(b.selected,!a));f&&d.getSelection().selectRanges([c]);d.fire("saveSnapshot");b.selected.remove();f||(c.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([c]));d.fire("saveSnapshot");return!1}}var d=a(),c=a(1);return{37:d,38:d,39:c,40:c,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function d(){var a=c.getSelection(); a&&a.removeAllRanges()}var c=b.editor;c.on("contentDom",function(){function b(){p=new CKEDITOR.dom.selection(c.getSelection());p.lock()}function d(){h.removeListener("mouseup",d);q.removeListener("mouseup",d);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument==f.$&&b.select()}var f=c.document,h=CKEDITOR.document,g=c.editable(),l=f.getBody(),q=f.getDocumentElement(),t=g.isInline(),F,p;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener(); 0!==F&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=c.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){F&&CKEDITOR.env.webkit&&(F=c._.previousActive&&c._.previousActive.equals(f.getActive()));c.unlockSelection(F);F=0},null,null,-1);g.attachListener(g,"mousedown",function(){F=0});if(CKEDITOR.env.ie||t)B?g.attachListener(g,"beforedeactivate",b,null,null,-1):g.attachListener(c,"selectionCheck", b,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){c.lockSelection(p);F=1},null,null,-1),g.attachListener(g,"mousedown",function(){F=0});if(CKEDITOR.env.ie&&!t){var u;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(u=c.window.getScrollPosition()))});g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&u&&(c.document.$.documentElement.scrollLeft=u.x,c.document.$.documentElement.scrollTop= u.y);u=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)q.on("mousedown",function(a){function b(a){a=a.data.$;if(c){var d=l.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(f){}c.setEndPoint(0>e.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);c.select()}}function d(){q.removeListener("mousemove",b);h.removeListener("mouseup",d);q.removeListener("mouseup",d);c.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)q.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",d),q.on("mouseup",d))})}}g.attachListener(g,"selectionchange",a,c);g.attachListener(g,"keyup",e,c);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){c.forceNextSelectionCheck(); c.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var D;g.attachListener(g,"mousedown",function(){D=1});g.attachListener(f.getDocumentElement(),"mouseup",function(){D&&e.call(c);D=0})}else g.attachListener(CKEDITOR.env.ie?g:f.getDocumentElement(),"mouseup",e,c);CKEDITOR.env.webkit&&g.attachListener(f,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:m(g)}(a=n(g))&&1q)g=m+1;else return{container:c,offset:a(e)}; if(-1==m||m==f.length-1&&0>q){k.moveToElementText(c);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;f=c.childNodes;if(!k)return e=f[f.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:f.length}:{container:e,offset:e.nodeValue.length};for(c=f.length;0]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+| )/g," ");h=h.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="\x3cpre\x3e"+h+"\x3c/pre\x3e";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(h); b=e}else h?b=D(c?[a.getHtml()]:d(a),b):a.moveChildren(b);b.replace(a);if(f){var c=b,l;(l=c.getPrevious(J))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("pre")&&(f=k(l.getHtml(),/\n$/,"")+"\n\n"+k(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e":c.setHtml(f),l.remove())}else c&&y(b)}function d(a){var b=[];k(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi, function(a,d){b.push(d)});return b}function k(a,b,d){var c="",f="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(c=b);d&&(f=d);return""});return c+a.replace(b,d)+f}function D(a,b){var d;1=c?(n=l.createText(""),n.insertAfter(this)):(a=l.createText(""),a.insertAfter(n),a.remove()));return n},substring:function(a,e){return"number"!=typeof e?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,e)}}),function(){function a(a,c,e){var n=a.serializable,m=c[e?"endContainer":"startContainer"],g=e?"endOffset":"startOffset",f=n?c.document.getById(a.startNode):a.startNode;a=n?c.document.getById(a.endNode):a.endNode;m.equals(f.getPrevious())?(c.startOffset=c.startOffset-m.getLength()- a.getPrevious().getLength(),m=a.getNext()):m.equals(a.getPrevious())&&(c.startOffset-=m.getLength(),m=a.getNext());m.equals(f.getParent())&&c[g]++;m.equals(a.getParent())&&c[g]++;c[e?"endContainer":"startContainer"]=m;return c}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,e)};var e={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),e=[],n;return{getNextRange:function(m){n= void 0===n?0:n+1;var g=a[n];if(g&&1b?-1:1}),f=0,e;fCKEDITOR.env.version?a[l].$.styleSheet.cssText+=g:a[l].$.innerHTML+=g}}var n={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]? CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(e(a))},icons:{},addIcon:function(a,b,c,f){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:f||"16px"})},getIconStyle:function(a,b,c,f,e){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]),g||(g=this.icons[a]));a=c||g&&g.path||"";f=f||g&&g.offset;e=e||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+ "');background-position:0 "+f+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,e="",h="";"function"==typeof c&&(e=c(this,"editor"),h=c(this,"panel"));a=[[f,a]];l([b],e,a);l(g,h,a)}).call(this,a)}});var m="cke_ui_color",g=[],f=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie|| !CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);g.push(a);var e=b.getUiColor();e&&l([a],CKEDITOR.skin.chameleon(b,"panel"),[[f,e]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e', CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var e=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!e||e!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,e=0;e=h.$.clientHeight?(h.setStyle("overflow-y", "hidden"),k||(B.addEventListener("scroll",b),k=!0)):(h.removeStyle("overflow-y"),k&&(B.removeEventListener("scroll",b),k=!1)))}var m,g,f,h,d,k=!1,D=a.config.autoGrow_bottomSpace||0,u=void 0!==a.config.autoGrow_minHeight?a.config.autoGrow_minHeight:200,q=a.config.autoGrow_maxHeight||Infinity,z=!a.config.autoGrow_maxHeight;a.addCommand("autogrow",{exec:n,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var y={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},A;for(A in y)a.on(A,function(b){"wysiwyg"== b.editor.mode&&setTimeout(function(){var b=a.getCommand("maximize");!a.window||b&&b.state==CKEDITOR.TRISTATE_ON?m=null:(n(),z||n())},100)});a.on("afterCommandExec",function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?h.removeStyle("overflow-y"):n())});a.on("contentDom",c);c();a.config.autoGrow_onStartup&&a.execCommand("autogrow");var B=a.editable().getWindow().$;B.addEventListener("scroll",b);k=!0}CKEDITOR.plugins.add("autogrow",{init:function(e){if(e.elementMode!= CKEDITOR.ELEMENT_MODE_INLINE)e.on("instanceReady",function(){a(e)})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(a){var e=0,b=function(b,g,f,h){if(h){h=new CKEDITOR.style(h);var d=c[f];d.unshift(h);a.attachStyleStateChange(h,function(b){!a.readOnly&&a.getCommand(f).setState(b)});a.addCommand(f,new CKEDITOR.styleCommand(h,{contentForms:d}));a.ui.addButton&&a.ui.addButton(b,{label:g,command:f,toolbar:"basicstyles,"+(e+=10)})}},c={bold:["strong","b",["span",function(a){a=a.styles["font-weight"]; return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},l=a.config,n=a.lang.basicstyles;b("Bold",n.bold,"bold",l.coreStyles_bold);b("Italic",n.italic,"italic",l.coreStyles_italic);b("Underline",n.underline,"underline",l.coreStyles_underline); b("Strike",n.strike,"strike",l.coreStyles_strike);b("Subscript",n.subscript,"subscript",l.coreStyles_subscript);b("Superscript",n.superscript,"superscript",l.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike= {element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){function a(a,b,c,f){if(!a.isReadOnly()&&!a.equals(c.editable())){CKEDITOR.dom.element.setMarker(f,a,"bidi_processed",1);f=a;for(var e=c.editable();(f=f.getParent())&&!f.equals(e);)if(f.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}f="useComputedState"in c.config?c.config.useComputedState:1;(f?a.getComputedStyle("direction"): a.getStyle("direction")||a.hasAttribute("dir"))!=b&&(a.removeStyle("direction"),f?(a.removeAttribute("dir"),b!=a.getComputedStyle("direction")&&a.setAttribute("dir",b)):a.setAttribute("dir",b),c.forceNextSelectionCheck())}}function e(a,b,c){var f=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(c==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(f,CKEDITOR.START)&&a.checkBoundaryOfElement(f,CKEDITOR.END)){for(var e;f&&f.type==CKEDITOR.NODE_ELEMENT&& (e=f.getParent())&&1==e.getChildCount()&&!(f.getName()in b);)f=e;return f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in b&&f}}function b(b){return{context:"p",allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,b){var d=a.config.useComputedState,c,d=void 0===d||d;if(!d){c=b.lastElement;for(var f=a.editable();c&&!(c.getName()in m||c.equals(f));){var e=c.getParent();if(!e)break;c=e}}c=c||b.block|| b.blockLimit;c.equals(a.editable())&&(f=a.getSelection().getRanges()[0].getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&(c=f);c&&(d=d?c.getComputedStyle("direction"):c.getStyle("direction")||c.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==d?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==d?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));d=(b.block||b.blockLimit||a.editable()).getDirection(1);d!=(a._.selDir||a.lang.dir)&&(a._.selDir=d,a.fire("contentDirChanged", d))},exec:function(c){var f=c.getSelection(),h=c.config.enterMode,g=f.getRanges();if(g&&g.length){for(var m={},y=f.createBookmarks(),g=g.createIterator(),A,B=0;A=g.getNextRange(1);){var w=A.getEnclosedNode();w&&(!w||w.type==CKEDITOR.NODE_ELEMENT&&w.getName()in n)||(w=e(A,l,h));w&&a(w,b,c,m);var r=new CKEDITOR.dom.walker(A),p=y[B].startNode,x=y[B++].endNode;r.evaluator=function(a){var b=h==CKEDITOR.ENTER_P?"p":"div",d;if(d=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in l){if(b=a.is(b))b=(b=a.getParent())? b.type==CKEDITOR.NODE_ELEMENT:!1;d=!(b&&a.getParent().is("blockquote"))}return!!(d&&a.getPosition(p)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(x)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;w=r.next();)a(w,b,c,m);A=A.createIterator();for(A.enlargeBr=h!=CKEDITOR.ENTER_BR;w=A.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)a(w,b,c,m)}CKEDITOR.dom.element.clearAllMarkers(m);c.forceNextSelectionCheck();f.selectBookmarks(y);this.editorFocus&&c.focus()}}}} function c(a){var b=a==g.setAttribute,c=a==g.removeAttribute,f=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(e,h){if(!this.isReadOnly()){var g;if(g=e==(b||c?"dir":"direction")||"style"==e&&(c||f.test(h))){a:{g=this;for(var l=g.getDocument().getBody().getParent();g;){if(g.equals(l)){g=!1;break a}g=g.getParent()}g=!0}g=!g}if(g&&(g=this.getDirection(1),l=a.apply(this,arguments),g!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),l}return a.apply(this,arguments)}}var l={table:1, ul:1,ol:1,blockquote:1,div:1},n={},m={};CKEDITOR.tools.extend(n,l,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(m,n,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function c(b,f,e,h,k){a.addCommand(e,new CKEDITOR.command(a,h));a.ui.addButton&&a.ui.addButton(b,{label:f,command:e,toolbar:"bidi,"+k})}if(!a.blockless){var f=a.lang.bidi;c("BidiLtr",f.ltr,"bidiltr",b("ltr"),10);c("BidiRtl",f.rtl,"bidirtl",b("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(b){a.fire("dirChanged", {node:b.data,dir:b.data.getDirection(1)})})});a.on("contentDirChanged",function(b){b=(a.lang.dir!=b.data?"add":"remove")+"Class";var c=a.ui.space(a.config.toolbarLocation);if(c)c[b]("cke_mixed_dir_content")})}}});for(var g=CKEDITOR.dom.element.prototype,f=["setStyle","removeStyle","setAttribute","removeAttribute"],h=0;harguments.length)){var g=a.call(this,c);g.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var l={role:c.role||"presentation"};c.includeLabel&&(l["aria-labelledby"]=g.labelId);CKEDITOR.ui.dialog.uiElement.call(this, b,c,d,"div",null,l,function(){var a=[],d=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+d+'" ',' id\x3d"'+g.labelId+'"',g.inputId?' for\x3d"'+g.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,b,c),"\x3c/div\x3e"):(d={type:"hbox",widths:c.widths, padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+d+'" id\x3d"'+g.labelId+'" for\x3d"'+g.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(c.controlStyle?' style\x3d"'+c.controlStyle+'"':"")+"\x3e"+e.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,a));return a.join("")})}},textInput:function(b, c,d){if(!(3>arguments.length)){a.call(this,c);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",l={"class":"cke_dialog_ui_input_"+c.type,id:e,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(l.maxlength=c.maxLength);c.size&&(l.size=c.size);c.inputStyle&&(l.style=c.inputStyle);var m=this,q=!1;b.on("load",function(){m.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(q=!0)});m.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&q&&(b.getButton("ok")&& setTimeout(function(){b.getButton("ok").click()},0),q=!1);m.bidi&&g.call(m,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");l["aria-labelledby"]=this._.labelId;this._.required&&(l["aria-required"]=this._.required);for(var b in l)a.push(b+'\x3d"'+l[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b, c,d){if(!(3>arguments.length)){a.call(this,c);var e=this,l=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",m={};c.validate&&(this.validate=c.validate);m.rows=c.rows||5;m.cols=c.cols||20;m["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(m.style=c.inputStyle);c.dir&&(m.dir=c.dir);if(e.bidi)b.on("load",function(){e.getInputElement().on("keyup",g)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){m["aria-labelledby"]=this._.labelId;this._.required&& (m["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',l,'" '],b;for(b in m)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(m[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,c,d){if(!(3>arguments.length)){var e=a.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this, b,c,d,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),d=[],g=CKEDITOR.tools.getNextId()+"_label",l={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};m(a);c["default"]&&(l.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,d,"input",null,l);d.push(' \x3clabel id\x3d"',g,'" for\x3d"',l.id,'"'+(c.labelStyle?' style\x3d"'+ c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return d.join("")})}},radio:function(b,c,d){if(!(3>arguments.length)){a.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var e=[],g=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){for(var a=[],d=[],l=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",n=0;narguments.length)){var e= a.call(this,c);c.validate&&(this.validate=c.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),d=[],g=[],l={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"');c.width&&d.push('style\x3d"width:'+c.width+'" ');d.push("\x3e"); void 0!==c.size&&(l.size=c.size);void 0!==c.multiple&&(l.multiple=c.multiple);m(a);for(var n=0,A;narguments.length)){void 0=== c["default"]&&(c["default"]="");var e=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,d,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',e.frameId, '" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,c,d){var e=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var g=CKEDITOR.tools.extend({},c),l=g.onClick;g.className=(g.className?g.className+" ":"")+"cke_dialog_ui_button";g.onClick=function(a){var d= c["for"];l&&!1===l.call(this,a)||(b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,g,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(c,e,g){if(!(3>arguments.length)){var l=[],m=e.html;"\x3c"!=m.charAt(0)&&(m="\x3cspan\x3e"+m+"\x3c/span\x3e");var n=e.focus;if(n){var A=this.focus;this.focus=function(){("function"== typeof n?n:A).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,c,e,l,"span",null,null,"");l=l.join("").match(a);m=m.match(b)||["","",""];d.test(m[1])&&(m[1]=m[1].slice(0,-1),m[2]="/"+m[2]);g.push([m[1]," ",l[1]||"",m[2]].join(""))}}}(),fieldset:function(a,b,d,c,e){var g=e.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,e,c,"fieldset",null,null,function(){var a=[];g&&a.push("\x3clegend"+ (e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var b=0;bb.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a= CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:l},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},c,!0);CKEDITOR.ui.dialog.textarea.prototype= new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,d){var c=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;c.$.text=a;c.$.value=void 0===b||null===b?a:b;void 0===d||null===d?CKEDITOR.env.ie?e.add(c.$):e.add(c.$,null):e.add(c.$,d);return this},remove:function(a){this.getInputElement().$.remove(a); return this},clear:function(){for(var a=this.getInputElement().$;0b-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function e(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;dl.width-h.width-g?l.width-h.width+("rtl"==e.lang.dir?0:k[1]):f.x,f.y+k[0]l.height-h.height-g?l.height-h.height+k[2]:f.y,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove", b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=v.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,f=null,e=a.getParentEditor(),g=e.config.dialog_magnetDistance,k=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(e){c={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);f=a.getPosition();if(CKEDITOR.env.ie6Compat){var g= v.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",d)}e.data.preventDefault()},a)}function d(a){function b(d){var q="rtl"==e.lang.dir,n=m.width,r=m.height,y=n+(d.data.$.screenX-l.x)*(q?-1:1)*(a._.moved?1:2),F=r+(d.data.$.screenY-l.y)*(a._.moved?1:2),p=a._.element.getFirst(),p=q&&p.getComputedStyle("right"),A=a.getPosition();A.y+F>h.height&&(F=h.height-A.y);(q?p:A.x)+y>h.width&&(y=h.width-(q?p:A.x));if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)n=Math.max(c.minWidth|| 0,y-g);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT||f==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(c.minHeight||0,F-k);a.resize(n,r);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);q&&(q.remove(),q=null);if(CKEDITOR.env.ie6Compat){var a=v.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,f=c.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(), g,k,h,l,m,q,n=CKEDITOR.tools.addFunction(function(c){m=a.getSize();var f=a.parts.contents;f.$.getElementsByTagName("iframe").length&&(q=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),f.append(q));k=m.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=m.width-a.parts.contents.getSize("width",1);l={x:c.screenX,y:c.screenY};h=CKEDITOR.document.getWindow().getViewPaneSize(); CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(f=v.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",d));c.preventDefault&&c.preventDefault()});a.on("load",function(){var b="";f==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":f==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+ '" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(n)})}}function k(a){a.data.preventDefault(1)}function D(a){var b=CKEDITOR.document.getWindow(),d=a.config,c=d.dialog_backgroundCoverColor||"white",f=d.dialog_backgroundCoverOpacity,e=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(c,f,e),g=x[d];g?g.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat? "absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+c,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(c="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+c+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+ c+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(e.join("")),g.setOpacity(void 0!==f?f:.5),g.on("keydown",k),g.on("keypress",k),g.on("keyup",k),g.appendTo(CKEDITOR.document.getBody()),x[d]=g);a.focusManager.add(g);v=g;a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+"px",height:a.height+ "px"})};var h=function(){var a=b.getScrollPosition(),d=CKEDITOR.dialog._.currentTop;g.setStyles({left:a.x+"px",top:a.y+"px"});if(d){do a=d.getPosition(),d.move(a.x,a.y);while(d=d._.parentDialog)}};p=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var l=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){l.prevScrollHandler=window.onscroll||function(){};window.onscroll=l},0);h()}}function u(a){v&&(a.focusManager.remove(v), a=CKEDITOR.document.getWindow(),v.hide(),a.removeListener("resize",p),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),p=null)}var q=CKEDITOR.tools.cssLength,z='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; CKEDITOR.dialog=function(b,f){function g(){var a=x._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,d=0;db.length)){var d=x._.currentFocusIndex;x._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var f=d,e=1d.height|| b.width+(0d.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:c,this._.moved?this._.position.y:f)},foreach:function(a){for(var b in this._.contents)for(var d in this._.contents[b])a.call(this,this._.contents[b][d]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})}, commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(J(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide(); if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else u(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",K);a.removeListener("keyup",I);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog; this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],d=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",c=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),f=this._.contents[a.id]={},e=c.getChild(), g=0;c=e.shift();)c.notAllowed||"hbox"==c.type||"vbox"==c.type||g++,f[c.id]=c,"function"==typeof c.getChild&&e.push.apply(e,c.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");c=CKEDITOR.env;f="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0arguments.length)){var k=(c.call?c(b):c)||"div", h=["\x3c",k," "],l=(f&&f.call?f(b):f)||{},m=(e&&e.call?e(b):e)||{},q=(g&&g.call?g.call(this,a,b):g)||"",n=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed=!0);m.id=n;var p={};b.type&&(p["cke_dialog_ui_"+b.type]=1);b.className&&(p[b.className]=1);b.disabled&&(p.cke_disabled=1);for(var r=m["class"]&&m["class"].split?m["class"].split(" "):[],n=0;nCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;y.fire("focus");d&&this.addClass(d)});b.on("blur",function(){y.fire("blur");d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex= a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=y.focusIndex}))}},hbox:function(a,b,d,c,f){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,g=f&&f.widths||null,k=f&&f.height||null,h,l={role:"presentation"};f&&f.align&&(l.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"hbox"},c,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(h=0;harguments.length)){this._||(this._={});var e=this._.children=b,g=f&&f.width||null,k=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},c,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');f&&f.expand&&b.push("height:100%;");b.push("width:"+q(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(f&& f.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var c=0;carguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild? this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,d){for(var c=b.children,f,e=[],g=[],h=0;h]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&a(b,f)})}function x(){if("wysiwyg"==b.mode){var a=v("paste");b.getCommand("cut").setState(v("cut"));b.getCommand("copy").setState(v("copy")); b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function v(a){if(E&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var c=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,K=0,I=0,E=0;(function(){b.on("key",r);b.on("contentDom",c);b.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly(); x()});b.contextMenu&&b.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:v("cut"),copy:v("copy"),paste:v("paste")}})})();(function(){function a(c,f,e,g,h){var k=b.lang.clipboard[f];b.addCommand(f,e);b.ui.addButton&&b.ui.addButton(c,{label:k,command:f,toolbar:"clipboard,"+g});b.addMenuItems&&b.addMenuItem(f,{label:k,command:f,group:"clipboard",order:h})}a("Cut","cut",f("cut"),10,1);a("Copy","copy",f("copy"),20,4);a("Paste","paste",e(),30,8)})();b.getClipboardData= function(a,c){function f(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();l=!0;c({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function g(){this.customTitle=a&&a.title}var h=!1,k="auto",l=!1;c||(c=a,a=null);b.on("paste",f,null,null,0);b.on("beforePaste",function(a){a.removeListener();h=!0;k=a.data.type},null,null,1E3);!1===w()&&(b.removeListener("paste",f),h&&b.fire("pasteDialog",g)?(b.on("pasteDialogCommit",e),b.on("dialogHide", function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){l||c(null)},10)})):c(null))}}function b(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html";return"htmlifiedtext"} function c(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
|)<\/div>)(?!$|(

(
|)<\/div>))/g,"\x3cbr\x3e").replace(/^(
(
|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/
(
|)<\/div>/)&& (b="\x3cp\x3e"+b.replace(/(
(
|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

$/,"\x3cbr\x3e")),-1){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return m(a,b)}function l(){function a(){var b={},d;for(d in CKEDITOR.dtd)"$"!= d.charAt(0)&&"div"!=d&&"span"!=d&&(b[d]=1);return b}var b={};return{get:function(c){return"plain-text"==c?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=b.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),c=b.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function n(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var f=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(f); return f.getHtml()}function m(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function g(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function f(b){var c=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function f(c,e,g){e.select();a(b,{dataTransfer:g,method:"drop"},1);g.sourceEditor.fire("saveSnapshot"); g.sourceEditor.editable().extractHtmlFromRange(c);g.sourceEditor.getSelection().selectRanges([c]);g.sourceEditor.fire("saveSnapshot")}function e(f,g){f.select();a(b,{dataTransfer:g,method:"drop"},1);c.resetDragDataTransfer()}function g(a,c,f){var e={$:a.data.$,target:a.data.getTarget()};c&&(e.dragRange=c);f&&(e.dropRange=f);!1===b.fire(a.name,e)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var l=b.editable(),m=CKEDITOR.plugins.clipboard.getDropTarget(b), n=b.ui.space("top"),w=b.ui.space("bottom");c.preventDefaultDropOnElement(n);c.preventDefaultDropOnElement(w);l.attachListener(m,"dragstart",g);l.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);l.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);l.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=a?h(a.startContainer):null,c.dragEndContainerChildCount= a?h(a.endContainer):null)},null,null,100);l.attachListener(m,"dragend",g);l.attachListener(b,"dragend",c.initDragDataTransfer,c,null,1);l.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);l.attachListener(m,"dragover",function(a){var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()});l.attachListener(m,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault(); var f=a.data.getTarget();if(!f.isReadOnly()||f.type==CKEDITOR.NODE_ELEMENT&&f.is("html")){var f=c.getRangeAtDropPosition(a,b),e=c.dragRange;f&&g(a,e,f)}}},null,null,9999);l.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);l.attachListener(b,"drop",function(a){if(a=a.data){var g=a.dropRange,h=a.dragRange,l=a.dataTransfer;l.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(h,g,l,b)},0):l.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?f(h,g,l): e(g,l)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var g,h=l();a.config.forcePasteAsPlainText?g="plain-text":a.config.pasteFilter?g=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(g="semantic-content");a.pasteFilter=h.get(g);e(a);f(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c= b.data.dataTransfer,f=c.getData("text/html");if(f)b.data.dataValue=f,b.data.type="html";else if(f=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(f),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g, "\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)e=f=d; f&&(b=f.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(f){f=f.data;var e=f.type,g=f.dataValue,k,l=a.config.clipboard_defaultContentType||"html", m=f.dataTransfer.getTransferType(a);k="html"==e||"html"==f.preSniffing?"html":b(g);"htmlifiedtext"==k&&(g=c(a.config,g));"text"==e&&"html"==k?g=n(a,g,h.get("plain-text")):m==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!f.dontFilter&&(g=n(a,g,a.pasteFilter));f.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);f.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==k||"html"==l?"html":"text");f.type=e;f.dataValue=g;delete f.preSniffing;delete f.startsWithEOL;delete f.endsWithEOL}, null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,f){function e(a,c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a= b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var g=b.startContainer;"number"==typeof f&&"number"==typeof c&&g.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,g,c)||e(a.endContainer,g,f))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,f=b.endOffset;return a.endContainer.equals(c)&& a.endOffset<=f||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,g.dragStartContainerChildCount,g.dragEndContainerChildCount);(m=this.isDropRangeAffectedByDragRange(b,c))||(l=b.createBookmark(!1)); g=c.clone().createBookmark(!1);m&&(l=b.createBookmark(!1));b=l.startNode;c=l.endNode;m=g.startNode;c&&b.getPosition(m)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&m.insertBefore(b);b=e.createRange();b.moveToBookmark(l);h.extractHtmlFromRange(b,1);c=e.createRange();c.moveToBookmark(g);a(e,{dataTransfer:f,method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,f=c.clientX,e=c.clientY,g=b.getSelection(!0).getRanges()[0],h= b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint)c=b.document.$.caretRangeFromPoint(f,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8m&& !l;m++){if(!l)try{c.moveToPoint(f,e-m),l=!0}catch(n){}if(!l)try{c.moveToPoint(f,e+m),l=!0}catch(r){}}if(l){var p="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+p+'"\x3e​\x3c/span\x3e');var x=b.document.getById(p);h.moveToPosition(x,CKEDITOR.POSITION_BEFORE_START);x.remove()}else{var v=b.document.$.elementFromPoint(f,e),C=new CKEDITOR.dom.element(v),K;if(C.equals(b.editable())||"html"==C.getName())return g&&g.startContainer&&!g.startContainer.equals(b.editable())?g:null;K=C.getClientRect(); f/i,bodyRegExp:/([\s\S]*)<\/body>/i, fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(h);this.id||(this.id="Text"==h?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=h)try{this.$.setData(h,this.id)}catch(c){}b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==h||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL= 1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a){a=this._.normalizeType(a);var b=this._.data[a];if(void 0===b||null===b||""===b)try{b=this.$.getData(a)}catch(c){}if(void 0===b||null===b||""===b)b="";"text/html"==a?(b=b.replace(this._.metaRegExp,""),(a=this._.bodyRegExp.exec(b))&&a.length&&(b=a[1],b=b.replace(this._.fragmentRegExp,""))):"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==b.substring(0, 7)&&(b="");return b},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==h&&"Text"==a&&(this.id=b);try{this.$.setData(a,b)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);d&&(b._.data[c]= d)}if(this.$){var b=this,c,f;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;cCKEDITOR.env.version?m.createText("\r"):m.createElement("br"), c.deleteContents(),c.insertNode(a),CKEDITOR.env.needsBrFiller?(m.createText("").insertAfter(a),n&&(y||z.blockLimit).appendBogus(),a.getNext().$.nodeValue="",c.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):g(a,b,c,l)}}};var n=CKEDITOR.plugins.enterkey,m=n.enterBr,g=n.enterBlock,f=/^h[0]$/}(),function(){function a(a,b){var c={},l=[],n={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'}; a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,d){var f=b?"\x26"+d+";":n[d];c[f]=b?n[d]:"\x26"+d+";";l.push(f);return""});if(!b&&a){a=a.split(",");var m=document.createElement("div"),g;m.innerHTML="\x26"+a.join(";\x26")+";";g=m.innerHTML;m=null;for(m=0;m(c+=d?1:-1))return;c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0c)return;c=Math.max(c,0);c=Math.ceil(c/k)*k;a.setStyle(b,c?c+(h.config.indentUnit||"px"):"");""=== a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function e(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var b=CKEDITOR.dtd.$listItem,c=CKEDITOR.dtd.$list,l=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(m){function g(){f.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 blockquote ol p pre ul":{propertiesOnly:!0, styles:h?null:"margin-left,margin-right",classes:h||null}};this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(h?"("+h.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,c){var f=c.block||c.blockLimit;if(!f.is(b))var g=f.getAscendant(b),f=g&&c.contains(g)||f;f.is(b)&&(f=f.getParent());if(this.enterBr||this.getContext(c)){if(h){var g=h,f=f.$.className.match(this.classNameRegex),m=this.isIndent,g=f?m?f[1]!=g.slice(-1):!0:m;return g?n:l}return this.isIndent? n:f?CKEDITOR[0>=(parseInt(f.getStyle(e(f)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:l}return l},exec:function(b){var f=b.getSelection(),f=f&&f.getRanges()[0],e;if(e=b.elementPath().contains(c))a.call(this,e,h);else for(f=f.createIterator(),b=b.config.enterMode,f.enforceRealBlocks=!0,f.enlargeBr=b!=CKEDITOR.ENTER_BR;e=f.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||a.call(this,e,h);return!0}}}}var f=CKEDITOR.plugins.indent,h=m.config.indentClasses;f.registerCommands(m,{indentblock:new g(m, "indentblock",!0),outdentblock:new g(m,"outdentblock")});CKEDITOR.tools.extend(g.prototype,f.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,blockquote:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:h?new RegExp("(?:^|\\s+)("+h.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function a(a){function c(f){for(var e=m.startContainer,l=m.endContainer;e&&!e.getParent().equals(f);)e=e.getParent();for(;l&&!l.getParent().equals(f);)l=l.getParent();if(!e||!l)return!1;for(var n= e,e=[],q=!1;!q;)n.equals(l)&&(q=!0),e.push(n),n=n.getNext();if(1>e.length)return!1;n=f.getParents(!0);for(l=0;lp;l++)q[l].indent+=n;e=CKEDITOR.plugins.list.arrayToList(q,d,null,a.config.enterMode,f.getDirection());if(!h.isIndent){var v;if((v=f.getParent())&&v.is("li"))for(var n=e.listNode.getChildren(),C=[],D,l=n.count()-1;0<=l;l--)(D=n.getItem(l))&&D.is&&D.is("li")&&C.push(D)}e&&e.listNode.replace(f);if(C&&C.length)for(l=0;lf[g-1].indent+1){e=f[g-1].indent+1-f[g].indent;for(h=f[g].indent;f[g]&&f[g].indent>=h;)f[g].indent+=e,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(f,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function e(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent= b}function b(a,b,c,d){for(var f,e;f=a[d?"getLast":"getFirst"](u);)(e=f.getDirection(1))!==b.getDirection(1)&&f.setAttribute("dir",e),f.remove(),c?f[d?"insertBefore":"insertAfter"](c):b.append(f,d)}function c(a){function c(f){var e=a[f?"getPrevious":"getNext"](d);e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a.getName())&&(b(a,e,null,!f),a.remove(),a=e)}c();c(1)}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]} function n(a,f,e){a.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var g=e.extractContents();f.trim(!1,!0);var h=f.createBookmark(),l=new CKEDITOR.dom.elementPath(f.startContainer),n=l.block,l=l.lastElement.getAscendant("li",1)||n,p=new CKEDITOR.dom.elementPath(e.startContainer),x=p.contains(CKEDITOR.dtd.$listItem),p=p.contains(CKEDITOR.dtd.$list);n?(n=n.getBogus())&&n.remove():p&&(n=p.getPrevious(d))&&k(n)&&n.remove();(n=g.getLast())&&n.type==CKEDITOR.NODE_ELEMENT&&n.is("br")&& n.remove();(n=f.startContainer.getChild(f.startOffset))?g.insertBefore(n):f.startContainer.append(g);x&&(g=m(x))&&(l.contains(x)?(b(g,x.getParent(),x),g.remove()):l.append(g));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){p=e.startPath();g=p.block;if(!g)break;g.is("li")&&(l=g.getParent(),g.equals(l.getLast(d))&&g.equals(l.getFirst(d))&&(g=l));e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove()}e=e.clone();g=a.editable();e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e); e.evaluator=function(a){return d(a)&&!k(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&c(e);f.moveToBookmark(h);f.select();a.fire("saveSnapshot")}function m(a){return(a=a.getLast(d))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in g?a:null}var g={ol:1,ul:1},f=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),d=function(a){return!(f(a)||h(a))},k=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,f){if(!g[a.getName()])return[]; d||(d=0);c||(c=[]);for(var e=0,h=a.getChildCount();e=l.$.documentMode&&u.append(l.createText(" ")),u.append(v.listNode),v=v.nextIndex;else if(-1== H.indent&&!c&&k){g[k.getName()]?(u=H.element.clone(!1,!0),D!=k.getDirection(1)&&u.setAttribute("dir",D)):u=new CKEDITOR.dom.documentFragment(l);var n=k.getDirection(1)!=D,O=H.element,t=O.getAttribute("class"),F=O.getAttribute("style"),L=u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f!=CKEDITOR.ENTER_BR||n||F||t),G,U=H.contents.length,P;for(k=0;kn.length)){K=n[n.length-1].getNext();E=h.createElement(this.type);x.push(E);for(J=x=void 0;n.length;)x=n.shift(),J=h.createElement("li"),H=x,H.is("pre")||D.test(H.getName())||"false"==H.getAttribute("contenteditable")?x.appendTo(J):(x.copyAttributes(J),v&&x.getDirection()&&(J.removeStyle("direction"),J.removeAttribute("dir")),x.moveChildren(J),x.remove()),J.appendTo(E);v&&u&&E.setAttribute("dir",v);K?E.insertBefore(K):E.appendTo(l)}}else this.state== CKEDITOR.TRISTATE_ON&&g[v.root.getName()]&&a.call(this,b,v,m);for(E=0;E=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());c?(d=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[e]=d;this.previousKeyGroup= e},keyGroupChanged:function(a){return b.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,e){var d=this.editor;if(this.locked||"ready"!=d.status|| "wysiwyg"!=d.mode)return!1;var k=d.editable();if(!k||"ready"!=k.status)return!1;k=this.snapshots;b||(b=new c(d));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==e&&d.fire("change");k.splice(this.index+1,k.length-this.index-1);k.length==this.limit&&k.shift();this.index=k.push(b)-1;this.currentImage=b;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(), c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;if(c)if(a)for(d=this.index-1;0<=d;d--){if(a=b[d],!c.equalsContent(a))return a.index= d,a}else for(d=this.index+1;d=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var e= this.undoManager;a=a.data.getKey();var h=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new c(e.editor,!0))))if(0this.$.offsetHeight){var d=c.createRange();d[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(g,"blur",function(){try{g.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(g,"touchend",function(){a.focus()});f=c.document.getElementsByTag("title").getItem(0);f.data("cke-title",f.getText());CKEDITOR.env.ie&&(c.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"== this.status&&(this.status="ready");c.fire("contentDom");this._.isPendingFocus&&(c.focus(),this._.isPendingFocus=!1);setTimeout(function(){c.fire("dataReady")},0)},0,this)}function e(a){function b(){var e;a.editable().attachListener(a,"selectionChange",function(){var b=a.getSelection().getSelectedElement();b&&(e&&(e.detachEvent("onresizestart",c),e=null),b.$.attachEvent("onresizestart",c),e=b.$)})}function c(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var e=a.document.$;e.execCommand("enableObjectResizing", !1,!a.config.disableObjectResizing);e.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(f){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function b(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var b=[],c;for(c in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+c+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&& (a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(b){function e(d){d&&d.removeListener();a.editable(new c(a, f.$.contentWindow.document.body));a.setData(a.getData(1),b)}var g="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",g=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(g)+"}())":"",f=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+g+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');f.setStyles({width:"100%",height:"100%"});f.addClass("cke_wysiwyg_frame").addClass("cke_reset"); if(g=a.ui.space("contents")){g.append(f);var h=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(h)f.on("load",e);var d=a.title,k=a.fire("ariaEditorHelpLabel",{}).label;d&&(CKEDITOR.env.ie&&k&&(d+=", "+k),f.setAttribute("title",d));if(k){var d=CKEDITOR.tools.getNextId(),D=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+d+'" class\x3d"cke_voice_label"\x3e'+k+"\x3c/span\x3e");g.append(D,1);f.setAttribute("aria-describedby",d)}a.on("beforeModeUnload",function(a){a.removeListener();D&& D.remove()});f.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!h&&e();a.fire("ariaWidget",f)}else CKEDITOR.warn('WIX davidsu: instance creation failed. You likely removed the dom object passed to "replace" method')})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,c=b.contentsCss;CKEDITOR.tools.isArray(c)||(b.contentsCss=c?[c]:[]);b.contentsCss.push(a)};var c=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler= CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,c){var e=this.editor;if(c)this.setHtml(a),this.fixInitialSelection(),e.fire("dataReady");else{this._.isLoadingData=!0;e._.dataStore={id:1};var g=e.config,f=g.fullPage,h=g.docType,d=CKEDITOR.tools.buildStyleHtml(b()).replace(/